<?php
namespace Macaca\Controller\Admin;

use Macaca\Module;
use Macaca\View;

class SiteSet extends Base {

    public function actionRead() {
        $view = new View\Admin\SiteSet($this->app);
        $data['title'] = '网站前台设置';
        $module = new Module\SiteSet($this->app);
        $data['site_set'] = $module->allSet;
        $data['url_save'] = $this->linker->toFix('/admin/site/set');
        $this->response->setBody($view->render($data));
    }

    public function actionSave() {
        $module = new Module\SiteSet($this->app);
        $module->saveSet($_POST);
        $this->writeLine('网站前台设置保存成功');

    }

} 